import request from '@/plugin/axios'

export function queryRoles (data) {
  return request({
    url: '/v1/role/list',
    method: 'post',
    data
  })
}

export function addRole (data) {
  return request({
    url: '/v1/role/add',
    method: 'post',
    data
  })
}

export function updateRole (id, data) {
  return request({
    url: `/v1/role/updateById/${id}`,
    method: 'post',
    data
  })
}

export function removeRole (data) {
  return request({
    url: `/v1/role/deleteByIds`,
    method: 'post',
    data
  })
}
